package java3_6;

/**
 *
 6：输出比10000大的10个质数
 */
public class homework6 {
    public static void main(String[] args) {
        int count = 0;
        int a = 10001;
        while (true) {
            boolean zhi = true;
            for (int i = 2; i * i <= a && zhi; i++) {
                if (a % i == 0) {
                    zhi = false; //不是质数
                }
            }
            if (zhi){
                count++;
                System.out.println(a);
                a++;
                if (count==10){
                    break;
                }
            }else {
                a++;
            }
        }
    }
}
